-- GENERATED SPELL FOR [Scryer Cavalier] --


function spell0_22967(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(30931,pUnit)
pUnit:RegisterEvent('Sorts_22967', 20350, 1)
end

function spell1_22967(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22967', 558, 1)
end

function spell2_22967(pUnit, Event) --@Summon Scryer Hawkstrider,n/a--
pUnit:FullCastSpellOnTarget(39783,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22967', 638, 1)
end

function Sorts_22967(pUnit, Event)
local choix_sorts_22967 = math.random(0, 2)
if choix_sorts_22967 == 0 then
pUnit:RegisterEvent('spell0_22967', 1, 1)
end
if choix_sorts_22967 == 1 then
pUnit:RegisterEvent('spell1_22967', 1, 1)
end
if choix_sorts_22967 == 2 then
pUnit:RegisterEvent('spell2_22967', 1, 1)
end
end

function mob22967_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22967', math.random(1500, 3000), 1)
end

function mob22967_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22967_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22967_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22967, 1, 'mob22967_Action')
RegisterUnitEvent(22967, 2, 'mob22967_Leave')
RegisterUnitEvent(22967, 3, 'mob22967_Kill')
RegisterUnitEvent(22967, 4, 'mob22967_Die')
